package com.itrustsolution.rms.entities;
// Generated 25 Mei 11 22:19:57 by Hibernate Tools 3.2.1.GA


import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * RmsModuleFunction generated by hbm2java
 */
@Entity
@Table(name="rms_module_function"
    ,catalog="rms"
)
public class RmsModuleFunction  implements java.io.Serializable {


     private Integer moduleFunctionId;
     private RmsModule rmsModule;
     private String moduleFunctionName;
     private Set<RmsGroupModuleFunc> rmsGroupModuleFuncs = new HashSet(0);

    public RmsModuleFunction() {
    }

	
    public RmsModuleFunction(RmsModule rmsModule, String moduleFunctionName) {
        this.rmsModule = rmsModule;
        this.moduleFunctionName = moduleFunctionName;
    }
    public RmsModuleFunction(RmsModule rmsModule, String moduleFunctionName, Set rmsGroupModuleFuncs) {
       this.rmsModule = rmsModule;
       this.moduleFunctionName = moduleFunctionName;
       this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="MODULE_FUNCTION_ID", unique=true, nullable=false)
    public Integer getModuleFunctionId() {
        return this.moduleFunctionId;
    }
    
    public void setModuleFunctionId(Integer moduleFunctionId) {
        this.moduleFunctionId = moduleFunctionId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="MODULE_ID", nullable=false)
    public RmsModule getRmsModule() {
        return this.rmsModule;
    }
    
    public void setRmsModule(RmsModule rmsModule) {
        this.rmsModule = rmsModule;
    }
    
    @Column(name="MODULE_FUNCTION_NAME", nullable=false, length=50)
    public String getModuleFunctionName() {
        return this.moduleFunctionName;
    }
    
    public void setModuleFunctionName(String moduleFunctionName) {
        this.moduleFunctionName = moduleFunctionName;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="rmsModuleFunction")
    public Set<RmsGroupModuleFunc> getRmsGroupModuleFuncs() {
        return this.rmsGroupModuleFuncs;
    }
    
    public void setRmsGroupModuleFuncs(Set<RmsGroupModuleFunc> rmsGroupModuleFuncs) {
        this.rmsGroupModuleFuncs = rmsGroupModuleFuncs;
    }




}


